package com.xhs.main.service.rsb.impl;

import com.xhs.main.dao.rsb.RsbMoneyDao;
import com.xhs.main.entity.rsb.RsbMoney;
import com.xhs.main.service.rsb.RsbMoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author author
 * @create 2020-10-22-20:44
 */
@Service
public class RsbMoneyServiceImpl implements RsbMoneyService {
    @Autowired
    RsbMoneyDao rsbMoneyDao;


    @Override
    public void insertRsbMoney(RsbMoney rsbMoney) {
        rsbMoneyDao.insertRsbMoney(rsbMoney);
    }

    @Override
    public RsbMoney selectRsbMoneyByNum(String rsbMoneyNum) {
        RsbMoney rsbMoney = rsbMoneyDao.selectRsbMoneyByNum(rsbMoneyNum);
        return rsbMoney;
    }

    @Override
    public void updateRsbMoney(RsbMoney rsbMoney, String rsbMonDep, String rsbMonPost) {
        rsbMoneyDao.updateRsbMoney(rsbMoney,rsbMonDep,rsbMonPost);
    }

    @Override
    public List<RsbMoney> selectChooseLimit(String rsbMonDep, String rsbMonPost, int page, int size) {
        List<RsbMoney> rsbMonies = rsbMoneyDao.selectChooseLimit(rsbMonDep, rsbMonPost, page, size);
        return rsbMonies;
    }

    @Override
    public List<RsbMoney> selectChoose(String rsbMonDep, String rsbMonPost) {
        List<RsbMoney> rsbMonies = rsbMoneyDao.selectChoose(rsbMonDep, rsbMonPost);
        return rsbMonies;
    }

    @Override
    public List<RsbMoney> selectAllRsbMoney() {
        List<RsbMoney> rsbMonies = rsbMoneyDao.selectAllRsbMoney();
        return rsbMonies;
    }

    @Override
    public void deleteRsbMoney(List<String> rsbMonNums) {
        rsbMoneyDao.deleteRsbMoney(rsbMonNums);
    }

    @Override
    public void deleteAllRsbMoney() {
        rsbMoneyDao.deleteAllRsbMoney();
    }
}
